<?php

namespace Syrius\Query;

/**
 * Punto di partenza delle classi SetVariable
 * TODO aderire bene allo standard MYSQL
 * @abstract
 * @package	Query
 * @author	Domenico Biancardi <domenico.biancardi@gmail.com>
 * @link	http://code.google.com/p/syrius/
 *
 */ abstract class SetVariable extends Query {
	/**
	 * chiave della variabile
	 */
	private $_key;

	/**
	 * valore della variabile
	 */
	private $_value;

	public function getKey() {
		return $this->_key;
	}

	public function setKey($value) {
		$this->_key = $value;
	}

	final public function getValue() {
		return $this->_value;
	}

	public function setValue($value) {
		$this->_value = $value;
	}

	/**
	 * Ritorna la versione stringa dell'oggetto che �stato creato
	 */
	public function __toString() {
		return "SET " . $this->_key . " " . $this->_value;
	}

}

/**
 * Enter description here ...
 * @package	Query
 * @author	Domenico Biancardi <domenico.biancardi@gmail.com>
 * @link	http://code.google.com/p/syrius/
 *
 */
class SetVariable_Autocommit extends SetVariable {
	public function __construct($mode) {
		$this->setKey("autocommit");
		$this->setValue($mode);
	}

}

/**
 * Enter description here ...
 * @package	Query
 * @author	Domenico Biancardi <domenico.biancardi@gmail.com>
 * @link	http://code.google.com/p/syrius/
 *
 */
class SetVariable_Charset extends SetVariable {
	public function __construct($mode) {
		$this->setKey("CHARACTER SET");
		$this->setValue($mode);
	}

}

/**
 * Enter description here ...
 * @package	Query
 * @author	Domenico Biancardi <domenico.biancardi@gmail.com>
 * @link	http://code.google.com/p/syrius/
 *
 */
class SetVariable_Engine extends SetVariable {
	public function __construct() {
	}

}

?>
